<template>
  <div class="container">
      <h3>系统日志</h3>
      <div style="margin:20px; 20px; border:1px solid #dcdfe6;border-radius:8px;padding:10px;">
          <div style="padding:10px; border-bottom:1px solid #ebeff5;position:relative;" v-for="(item,index) in list" :key="index">

              <span >{{item.operationWork}}</span><span style="float:right;font-size:14px;">{{item.createTime}}</span>
              <div style="margin-top:10px; width:300px;font-size:11px;color:#606266;">

                <span style="margin-top:10px;">{{item.operationType}}</span><span style="float:right;margin-left:30px;">操作人：{{item.operationName}}</span>
              </div>


          </div>

      </div>
       <el-pagination layout="total, prev, pager, next, jumper" :page-size="pagesize" @current-change="handleCurrentChange" :total="total" style="margin: 20px auto;"></el-pagination>
  </div>
</template>

<script>

    import {system_list} from "@/request/api"
    export default {
        data(){
            return{
                list:[],
                pagesize:10,
                total:0,
                currentPage:1,
            }
        },
        mounted(){
            this.init()
        },
        methods:{
            handleCurrentChange(val){
                this.currentPage = val
                this.init()
            },
            init(){
                let data = {
                    page:this.currentPage
                }
                system_list(data).then((res)=>{
                    // console.log(res)
                    this.list = res.rows
                    this.total = res.total
                })
            }
        }
    }
</script>

<style scoped>
 .el-pagination{
    text-align: center;
}
</style>
